home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Resources / Developers / PSPad 4.5.2 / pspad452inst_en.exe / {app} / PSPad.chm / js / controldisplay.js next >
Encoding:
Text File  |  2006-10-18  |  595 b   |  23 lines

  1. function toggleDiv(divId,lines)
  2. {
  3.     var theSpan = document.getElementById ? document.getElementById(divId) : document.all ? document.all[divId] : (new Object());
  4.     if(theSpan.style) {
  5.         theSpan = theSpan.style;
  6.     }
  7.     if (theSpan.display == 'none') {
  8.         var collapse = false;
  9.     } else {
  10.         var collapse = true;
  11.     }
  12.     if (collapse == false) {
  13.         theSpan.display = '';
  14.         if (lines) {
  15.             var x = lines * 15;
  16.             window.scrollBy(0,x);
  17.         }
  18.     } else {
  19.         theSpan.display = 'none';
  20.     }
  21.     return void(0);
  22. }
  23.